package com.eshop.tools.domain;

import javax.validation.constraints.NotBlank;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.sql.Timestamp;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

@TableName("verification_code")
public class VerificationCode implements Serializable
{
    @TableId
    private Long id;
    private String code;
    private String scenes;
    private Boolean status;
    private String type;
    private String value;
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;
    
    public VerificationCode(final String code, final String scenes, @NotBlank final String type, @NotBlank final String value) {
        this.status = true;
        this.code = code;
        this.scenes = scenes;
        this.type = type;
        this.value = value;
    }
    
    public Long getId() {
        return this.id;
    }
    
    public String getCode() {
        return this.code;
    }
    
    public String getScenes() {
        return this.scenes;
    }
    
    public Boolean getStatus() {
        return this.status;
    }
    
    public String getType() {
        return this.type;
    }
    
    public String getValue() {
        return this.value;
    }
    
    public Timestamp getCreateTime() {
        return this.createTime;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setCode(final String code) {
        this.code = code;
    }
    
    public void setScenes(final String scenes) {
        this.scenes = scenes;
    }
    
    public void setStatus(final Boolean status) {
        this.status = status;
    }
    
    public void setType(final String type) {
        this.type = type;
    }
    
    public void setValue(final String value) {
        this.value = value;
    }
    
    public void setCreateTime(final Timestamp createTime) {
        this.createTime = createTime;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof VerificationCode)) {
            return false;
        }
        final VerificationCode other = (VerificationCode)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$status = this.getStatus();
        final Object other$status = other.getStatus();
        Label_0102: {
            if (this$status == null) {
                if (other$status == null) {
                    break Label_0102;
                }
            }
            else if (this$status.equals(other$status)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$code = this.getCode();
        final Object other$code = other.getCode();
        Label_0139: {
            if (this$code == null) {
                if (other$code == null) {
                    break Label_0139;
                }
            }
            else if (this$code.equals(other$code)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$scenes = this.getScenes();
        final Object other$scenes = other.getScenes();
        Label_0176: {
            if (this$scenes == null) {
                if (other$scenes == null) {
                    break Label_0176;
                }
            }
            else if (this$scenes.equals(other$scenes)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        Label_0213: {
            if (this$type == null) {
                if (other$type == null) {
                    break Label_0213;
                }
            }
            else if (this$type.equals(other$type)) {
                break Label_0213;
            }
            return false;
        }
        final Object this$value = this.getValue();
        final Object other$value = other.getValue();
        Label_0250: {
            if (this$value == null) {
                if (other$value == null) {
                    break Label_0250;
                }
            }
            else if (this$value.equals(other$value)) {
                break Label_0250;
            }
            return false;
        }
        final Object this$createTime = this.getCreateTime();
        final Object other$createTime = other.getCreateTime();
        if (this$createTime == null) {
            if (other$createTime == null) {
                return true;
            }
        }
        else if (this$createTime.equals(other$createTime)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof VerificationCode;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $status = this.getStatus();
        result = result * 59 + (($status == null) ? 43 : $status.hashCode());
        final Object $code = this.getCode();
        result = result * 59 + (($code == null) ? 43 : $code.hashCode());
        final Object $scenes = this.getScenes();
        result = result * 59 + (($scenes == null) ? 43 : $scenes.hashCode());
        final Object $type = this.getType();
        result = result * 59 + (($type == null) ? 43 : $type.hashCode());
        final Object $value = this.getValue();
        result = result * 59 + (($value == null) ? 43 : $value.hashCode());
        final Object $createTime = this.getCreateTime();
        result = result * 59 + (($createTime == null) ? 43 : $createTime.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "VerificationCode(id=" + this.getId() + ", code=" + this.getCode() + ", scenes=" + this.getScenes() + ", status=" + this.getStatus() + ", type=" + this.getType() + ", value=" + this.getValue() + ", createTime=" + this.getCreateTime() + ")";
    }
    
    public VerificationCode(final Long id, final String code, final String scenes, final Boolean status, final String type, final String value, final Timestamp createTime) {
        this.status = true;
        this.id = id;
        this.code = code;
        this.scenes = scenes;
        this.status = status;
        this.type = type;
        this.value = value;
        this.createTime = createTime;
    }
    
    public VerificationCode() {
        this.status = true;
    }
}
